package com.jse.network;

import java.io.InputStream;

public class StreamUtil {
	public static String getInput(InputStream input) {
		int count = 1024;

		if (input != null) {
			try {
				// while (count == 0) {
				// count = input.available();
				// }
				byte[] buffer = new byte[count];
				input.read(buffer);
//				input
				// input.close();
				return new String(buffer).toString();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		return null;
	}
}
